﻿<UserControl x:Class="GTServices.WPF.Client.Views.Entities.LanguageView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
             xmlns:controls="clr-namespace:GTServices.WPF.Client.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <DockPanel>
        <DockPanel DockPanel.Dock="Bottom">
            <DockPanel DockPanel.Dock="Top">
                <GroupBox DockPanel.Dock="Top" Header="Name">
                    <TextBox Text="{Binding Language.Name, UpdateSourceTrigger=PropertyChanged}" HorizontalContentAlignment="Right"/>
                </GroupBox>
                <DockPanel DockPanel.Dock="Bottom">
                    <ListView SelectedItem="{Binding SelectedFileExtension}" ItemsSource="{Binding FileExtensions}" ScrollViewer.VerticalScrollBarVisibility="Visible">
                        <ListView.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add" cal:Message.Attach="AddFileExtension()" />
                                <MenuItem Header="Remove" cal:Message.Attach="RemoveFileExtension()" />
                            </ContextMenu>
                        </ListView.ContextMenu>
                        <ListView.View>
                            <GridView>
                                <GridViewColumn Header="Extension" Width="Auto" DisplayMemberBinding="{Binding FileExtension.Extension}" />
                            </GridView>
                        </ListView.View>
                    </ListView>
                </DockPanel>
            </DockPanel>
        </DockPanel>
    </DockPanel>
</UserControl>
